<template>
   <diiv class="main">
    <el-row>
        <el-table
            :data="tableData"
            border
            style="width: 80%;margin-left:5%">
            <el-table-column
            prop="sitename"
            label="要货工地"
            width="120">
            </el-table-column>
            <el-table-column
            prop="listid"
            label="磅单编号"
            width="200">
            </el-table-column>
            <el-table-column
            prop="huwuname"
            label="货物名称"
            width="120">
            </el-table-column>
            <el-table-column
            prop="carnumber"
            label="车牌号"
            width="130">
            </el-table-column>
            <el-table-column
            prop="weight"
            label="净重（吨）"
            width="130">
            </el-table-column>
            <el-table-column
            prop="licheng"
            label="调度里程"
            width="130">
            </el-table-column>
            <el-table-column label="操作" width="">
            <template>
            <!-- slot-scope="scope" -->
                <el-button :underline="false"
                size="mini"
                type="primary" @click="detailinf()">磅单详情</el-button>
                <el-button :underline="false"
                size="mini"
                type="primary" @click="detailinfo()">查看明细</el-button>
            </template>
            </el-table-column>
        </el-table>
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        layout="total, prev, pager, next, jumper"
        :total="400"
        style="margin-left:5%">
        </el-pagination>
    </el-row>
  </diiv> 
</template>
<script>
export default {
    data() {
      return {
        currentPage: 1,
         tableData: [{
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        },
       {
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        },
        {
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        },
        {
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        },
        {
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        },
        {
            sitename:'旭辉运河悦章',
            listid:'FHD-RC20180928-001',
            huwuname:'预拌抹灰砂浆',
            carnumber:'浙AY815D',
            weight:'31.4',
            licheng:'10.00',
        }]
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      },
      onSubmit() {
        console.log('submit!');
      },
      open() {
        this.$confirm('是否签收?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '签收成功!'
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消签收'
          });          
        });
      },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      },
      detailinf(){
         window.location.href='/listdetail' 
      },
      detailinfo(){
         window.location.href='/errordetail' 
      }
    }
}
</script>
<style src="../style/mine.css">

</style>